// 模块的入口文件
import { defineNuxtModule, createResolver, addImportsDir } from "nuxt/kit";

export default defineNuxtModule({
  meta: {
    name: "duyi-utils-module",
    compatibility: {
      nuxt: "^3.0.0",
    },
  },
  setup() {
    // 负责注入到 nuxt 应用里面
    const { resolve } = createResolver(import.meta.url);
    // 做自动导入
    addImportsDir(resolve("runtime/composables"));
  },
});
